package com.backend.service.impl;

import com.backend.mapper.NewMapper;

import com.backend.pojo.domain.New;
import com.backend.service.NewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewServiceImpl implements NewService {
    @Autowired
    private NewMapper newDao;

    @Override
    public List<New> selectAll() {
        return newDao.selectAll();
    }

    @Override
    public New selectById(int newNo) {
        return newDao.selectById(newNo);
    }

    @Override
    public List<New> selectByConditionMulti(New news) {
        return newDao.selectByConditionMulti(news);
    }

    @Override
    public List<New> selectByConditionSingle(New news) {
        return selectByConditionSingle(news);
    }

    @Override
    public boolean addNew(New news) {
        newDao.addNew(news);
        return true;
    }

    @Override
    public boolean update(New news) {
        newDao.update(news);
        return true;
    }

    @Override
    public boolean deleteNewById(int newNo) {
        newDao.deleteNewById(newNo);
        return true;
    }

    @Override
    public boolean deleteManyNewByIds(int[] newNos) {
        newDao.deleteManyNewByIds(newNos);
        return true;
    }
}
